ARCH=i686
BRANCH_PREFIX="gnomeos-3.4-${ARCH}-"
-if ! test -d /ostree; then
- mkdir /ostree
+if ! test -d /ostree/repo/objects; then
+ mkdir -p /ostree
$SRCDIR/ostree-setup.sh /ostree
fi
+#ostree pull http://ostree.gnome.org/3.4/repo gnomeos-3.4-i686-{runtime,devel}
+if ! test -f /ostree/repo/refs/heads/gnomeos-3.4-i686-runtime; then
+ cat <<EOF
+You must get a repo from somewhere...e.g.:
+ cd /ostree && rsync --progress -ave ssh master.gnome.org:/home/users/walters/ostree/repo .
+EOF
+ exit 1
+fi
+
cd /ostree
for branch in runtime devel; do
rev=$(ostree --repo=$(pwd)/repo rev-parse ${BRANCH_PREFIX}${branch});
ln -s ${BRANCH_PREFIX}runtime-current current
cp -a ./${BRANCH_PREFIX}${branch}-current/usr/sbin/ostree-init .
+cd -
-cp $SRCDIR/15_ostree /etc/grub.d/
+if test -d /etc/grub.d; then
+ cp $SRCDIR/15_ostree /etc/grub.d/
+else
+ cat <<EOF
+GRUB 2 not detected; you'll need to edit e.g. /boot/grub/grub.conf manually
+Kernel has been installed as /boot/bzImage-gnomeos.bin
+EOF
+fi
OSTREE_REPO=$1
shift
test -n "$OSTREE_REPO" || usage
+TYPE=$1
+shift
ARCH=i686
BRANCH_PREFIX="gnomeos-3.4-${ARCH}-"
for branch in runtime devel; do
rev=$(ostree --repo=repo rev-parse ${BRANCH_PREFIX}${branch});
if ! test -d ${BRANCH_PREFIX}${branch}-${rev}; then
- ostree --repo=repo checkout ${rev} ${BRANCH_PREFIX}${branch}-${rev}
- ostbuild chroot-run-triggers ${BRANCH_PREFIX}${branch}-${rev}
+ ostree --repo=repo checkout ${rev} ${BRANCH_PREFIX}${branch}-${rev}.tmp
+ ostbuild chroot-run-triggers ${BRANCH_PREFIX}${branch}-${rev}.tmp
+ if test x$TYPE = xcurrent; then
+ cp -ar /lib/modules/`uname -r` ${BRANCH_PREFIX}${branch}-${rev}.tmp/lib/modules
+ fi
+ mv ${BRANCH_PREFIX}${branch}-${rev}{.tmp,}
fi
rm -f ${BRANCH_PREFIX}${branch}-current
ln -s ${BRANCH_PREFIX}${branch}-${rev} ${BRANCH_PREFIX}${branch}-current
umount fs
rmdir fs
-ARGS="$@"
+ARGS="rd.plymouth=0 $@"
if ! echo $ARGS | grep -q 'init='; then
ARGS="init=/ostree-init $ARGS"
fi
-if ! echo $ARGS | grep -q 'root='; then
- ARGS="root=/dev/hda $ARGS"
-fi
if ! echo $ARGS | grep -q 'ostree='; then
ARGS="ostree=${BRANCH_PREFIX}runtime-current $ARGS"
fi
+if test x$TYPE = xqemu; then
+ ARGS="root=/dev/hda $ARGS"
+ KERNEL=./tmp-eglibc/deploy/images/bzImage-qemux86.bin
+else
+ if test x$TYPE = xcurrent; then
+ ARGS="root=/dev/sda $ARGS"
+ KERNEL=/boot/vmlinuz-`uname -r`
+ INITRD_ARG="-initrd /boot/initramfs-`uname -r`.img"
+ fi
+fi
-exec qemu-kvm -kernel ./tmp-eglibc/deploy/images/bzImage-qemux86.bin -hda gnomeos-fs.img -net user -net nic,model=virtio -m 512M -append "$ARGS" -monitor stdio
+exec qemu-kvm -kernel ${KERNEL} ${INITRD_ARG} -hda gnomeos-fs.img -net user -net nic,model=virtio -m 512M -append "$ARGS" -monitor stdio